package com.nowcoder.community;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;

@MapperScan("com.nowcoder.community.mapper")
@SpringBootApplication
public class CommunityApplication {

    @PostConstruct
//    这个注释 让方法在构造器执行完后执行
    public void init() {
//        解决netty 启动冲突问题
// see Netty4Utils.setAvailableProcessors()
        System.setProperty("es.set.netty.runtime.available.processors", "false");
    }

    public static void main(String[] args) {
        SpringApplication.run(CommunityApplication.class, args);
    }

}
